home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-03-25 | 873 b | 23 lines | [TEXT/MPad] |
- -- This calculates the MonthlyPayment required to pay off an
- -- AmountBorrowed at an AnnualPercentageRate in equal monthly payments
- -- for a number of Years. See also: "finance" XFun.
-
- MonthlyPayment(AmountBorrowed,AnnualPercentageRate,Years):805.59
- AmountBorrowed=100000; AnnualPercentageRate=7.5; Years=20
-
- MonthlyPayment(Amount,Rate,Years)=Amount*installment(Rate/1200,Years*12)
-
- -- Show how the MonthlyPayment changes with the term.
- plot MonthlyPayment(AmountBorrowed,AnnualPercentageRate,X)
- Xmin=5; Xmax=30; Ymin=0; Ymax=AmountBorrowed/50
-
- -- Baseline is interest payment only (no reduction of principal).
- plot AmountBorrowed*AnnualPercentageRate/1200
-
- -- installment required to amortize 1 in n periods
- -- at interest rate of i per period
- installment(i,n)=s(i,n)*i/(s(i,n)-1)
-
- -- amount of 1 compounded at interest rate of i per period for n periods
- s(i,n)=(1+i)^n
-